﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using W.Common.Enum;
using W.Warehouse.Domain.AllocationProduct;

namespace W.Warehouse.Domain.DTO
{
    public class AllocationModelDTO
    {
        /// <summary>
        /// 调拨Id
        /// </summary>
        public int AllocationId { get; set; }
        /// <summary>
        /// 调拨单号
        /// </summary>
        public string? AllocationNo { get; set; }
        /// <summary>
        /// 仓库id
        /// </summary>
        public int? WarehouseId { get; set; }
        /// <summary>
        /// 调拨仓库
        /// </summary>
        public string? AWarehouseName { get; set; }
        /// <summary>
        /// 关联订单号
        /// </summary>
        public string? AssociateNumber { get; set; }
        /// <summary>
        /// 制单人
        /// </summary>
        public string? SingleMaker { get; set; }
        /// <summary>
        /// 制单时间
        /// </summary>
        public DateTime? SingleTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? AllocationRemarks { get; set; }
        /// <summary>
        /// 单据状态
        /// </summary>
        public AuditStatus? AllocationStatus { get; set; }
        public string? AllocationStatusText { get; set; }
        /// <summary>
        /// 审核原因
        /// </summary>
        public string? ExamineReason { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExaminePeople { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? ExamineTime { get; set; }
        /// <summary>
        /// 公司Id
        /// </summary>
        public string? officeId { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int? userid { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 删除人
        /// </summary>
        public string? DeleteName { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? DeleteTime { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool? IsDelete { get; set; }
        public List<AllocationProductList> allocationProductList { get; set; }
    }
    public class AllocationProductList
    {
        /// <summary>
        /// 调拨产品id
        /// </summary>
        [Key]
        public int AllocationProductId { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }
        /// <summary>
        /// 产品编号
        /// </summary>
        public string? ProductNo { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string? ProductSpec { get; set; }
        /// <summary>
        /// 批次
        /// </summary>
        public string? ProductBatch { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal? ProductPrice { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int? Quantity { get; set; }
        /// <summary>
        /// 库位
        /// </summary>
        public string? BinLocationName { get; set; }
        /// <summary>
        /// 调拨仓库
        /// </summary>
        public int? WarehouseId { get; set; }
        /// <summary>
        /// 公司Id
        /// </summary>
        public string? officeId { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int? userid { get; set; }
        /// <summary>
        /// 调拨id
        /// </summary>
        public int? AllocationId { get; set; }
    }
}
